import qs from "qs"
import request from "@/request/request";
//请求精品数据
export const JingPinAPI = () => request.get("/products/recommend")
    //请求热门兑换数据
export const ReMenAPI = () => request.get("/products/hot");
//获取验证码
export const SendSMSAPI = (params) => request.post("/sendSMS", qs.stringify(params));
//登录请求
export const PhoneReginAPI = (params) => {
    return request.post("/phoneRegin", qs.stringify(params));
};
// 微信扫码登录请求
export const WeiXinLoginAPI = (params) => request.post("/wechatUsers/PCLogin", qs.stringify(params))
    // 手机关联微信
export const BindingAPI = (params) => request.post("/wechatUsers/binding", qs.stringify(params))
    //获取用户信息
export const UserProfilesAPI = () => request.get("/shop/userProfiles");

//详情页信息  
export const GoodDetailsAPI = (id) => request.get(`/products/${id}`);
//加入购物车
export const AddToCartAPI = (params) =>
    request.post("/shop/carts/add", qs.stringify(params));